<title>个人信息 - {:getSettingOptionsCache('base.web_site_title') ?: '后台管理系统模板'}</title>
<link rel="stylesheet" type="text/css" href="{:HTTP_STATIC_ADMIN_CDN_URL}css/style.min.css">

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <header class="card-header"><div class="card-title">账号中心</div></header>
                <div class="card-body user-select-none">

                    <div class="row justify-content-evenly">
                        <div class="col-sm-6 col-sm-6 col-md-5">
                            <div class="card shadow pe-auto">
                                <div class="card-body" onclick="onOpenPage(this)" data-url="{:url('/admin/admin/account')}" data-title="账号信息">
                                    <div class="text-primary d-flex justify-content-start">
                                        <div class="me-3">
                                            <img src="{$admin['avatar'] ? : (getSettingOptionsCache('base.web_site_logo') ?: HTTP_STATIC_CDN_URL . '/logo/logo.png')}" alt="..." class="avatar-lg rounded-circle me-3">
                                        </div>
                                        <div class="w-75 d-flex align-items-center justify-content-evenly flex-column">
                                            <div class="w-100 fs-5 text-black">
                                                {$admin['nick'] ? '你好,' . $admin['nick'] : '<span class="text-warning">请设置昵称</span>'}
                                            </div>
                                            <div class="w-100 fs-6 text-muted">
                                                账号 {$admin['name']}
                                            </div>
                                        </div>
                                        <div class="w-25 d-flex align-items-center justify-content-end {$admin['nick'] ? '' : 'text-warning'}">
                                            <span class="fs-5">
                                              {$admin['nick'] ? '管理信息' : '去更新'}
                                            </span>
                                            <span>
                                              <i class="mdi mdi-chevron-right fs-2"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row justify-content-evenly">
                        <div class="col-sm-6 col-sm-6 col-md-5">
                            <div class="card shadow pe-auto">
                                <div class="card-body" onclick="onOpenPage(this)" data-url="{:url('/admin/admin/password')}" data-title="修改密码">
                                    <div class="text-primary d-flex justify-content-start">
                                        <div class="me-3">
                                            <span class="avatar-md rounded-circle avatar-box">
                                              <i class="mdi mdi-lock-outline fs-2"></i>
                                            </span>
                                        </div>
                                        <div class="w-75 d-flex align-items-center justify-content-evenly flex-column">
                                            <div class="w-100 fs-5 text-black">
                                                修改密码
                                            </div>
                                            <div class="w-100 fs-6 text-muted">
                                                重置账号登录密码
                                            </div>
                                        </div>
                                        <div class="w-25 d-flex align-items-center justify-content-end">
                                            <span class="fs-5">
                                              去修改
                                            </span>
                                            <span>
                                              <i class="mdi mdi-chevron-right fs-2"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="row justify-content-evenly">
                        <div class="col-sm-6 col-sm-6 col-md-5">
                            <div class="card shadow pe-auto">
                                <div class="card-body" onclick="onOpenPage(this)" data-url="{:url('/admin/admin/email')}" data-title="绑定邮箱">
                                    <div class="text-primary d-flex justify-content-start">
                                        <div class="me-3">
                                            <span class="avatar-md rounded-circle avatar-box">
                                              <i class="mdi mdi-email fs-2"></i>
                                            </span>
                                        </div>
                                        <div class="w-75 d-flex align-items-center justify-content-evenly flex-column">
                                            <div class="w-100 fs-5 text-black">
                                                {$admin['email'] ? privacy($admin['email']) : '绑定邮箱'}
                                            </div>
                                            <div class="w-100 fs-6 text-muted">
                                                将邮箱与账号绑定，提升账号安全性
                                            </div>
                                        </div>
                                        <div class="w-25 d-flex align-items-center justify-content-end {$admin['email'] ? '' : 'text-warning'}">
                                            <span class="fs-5">
                                                {$admin['email'] ? '更换邮箱' : '未绑定'}
                                            </span>
                                            <span>
                                              <i class="mdi mdi-chevron-right fs-2"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="{:HTTP_STATIC_ADMIN_CDN_URL}js/layer/src/layer.js"></script>
<script>
    function onOpenPage(value){
        location.href = $(value).data('url');
        // openPage({
        //     url: $(value).data('url')
        // }, $(value).data('title'));
    }
</script>